package com.aiyige.base.eventbus;

/**
 * xiachao
 */
public class EventLastPlayProgressUpdate {

    public EventLastPlayProgressUpdate() {

    }

    private String resourceId;
    private int stage;
    private long progress;

    public EventLastPlayProgressUpdate(Builder builder) {
        setResourceId(builder.resourceId);
        setStage(builder.stage);
        setProgress(builder.progress);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getResourceId() {
        return resourceId == null ? "" : resourceId;
    }

    public void setResourceId(String resourceId) {
        this.resourceId = resourceId;
    }

    public int getStage() {
        return stage;
    }

    public void setStage(int stage) {
        this.stage = stage;
    }

    public long getProgress() {
        return progress;
    }

    public void setProgress(long progress) {
        this.progress = progress;
    }

    @Override
    public String toString() {
        return "EventLastPlayProgressUpdate{" +
                "resourceId='" + resourceId + '\'' +
                ", stage=" + stage +
                ", progress=" + progress +
                '}';
    }

    public static final class Builder {
        private String resourceId;
        private int stage;
        private long progress;

        private Builder() {
        }

        public Builder resourceId(String resourceId) {
            this.resourceId = resourceId;
            return this;
        }

        public Builder stage(int stage) {
            this.stage = stage;
            return this;
        }

        public Builder progress(long progress) {
            this.progress = progress;
            return this;
        }

        public EventLastPlayProgressUpdate build() {
            return new EventLastPlayProgressUpdate(this);
        }
    }
}
